<template>
    <div class="container">
        <h2 style="text-align: center">控制点</h2>
        <div style="display: flex;justify-content: space-around;margin-top: 30px;">
            <div class="left" style="display: flex;flex-direction: column;align-items: center">
                <div  style="font-size: 20px;font-weight: 700;display: flex;justify-content: space-around;align-items: center">
                    <span style="margin-left: 5px;">总数</span>
                </div>
                <div style="font-size: 30px;font-weight: 700;color: #1ab394;">{{deviceLoop.total}}</div>
            </div>

            <el-divider direction="vertical"></el-divider>
            <div class="right" style="display: flex;flex-direction: column;align-items: center">
                <div style="font-size: 20px;font-weight: 700;display: flex;justify-content: space-around;align-items: center">
                    <span style="margin-left: 5px;">正常</span>
                </div>
                <div style="font-size: 30px;font-weight: 700;color: #1ab394;">{{deviceLoop.normal}}</div>
            </div>
        </div>
        <div style="display: flex;justify-content: space-around;margin-top: 10px;">
            <div class="right" style="display: flex;flex-direction: column;align-items: center">
                <div style="font-size: 20px;font-weight: 700;display: flex;justify-content: space-around;align-items: center">
                    <span style="margin-left: 5px;">报警</span>
                </div>
                <div style="font-size: 30px;font-weight: 700;color: red;">{{deviceLoop.warn}}</div>
            </div>
            <el-divider direction="vertical"></el-divider>
            <div class="right" style="display: flex;flex-direction: column;align-items: center">
                <div style="font-size: 20px;font-weight: 700;display: flex;justify-content: space-around;align-items: center">
                    <span style="margin-left: 5px;">异常</span>
                </div>
                <div style="font-size: 30px;font-weight: 700;color: orange;">{{deviceLoop.error}}</div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'loop',
    props:{
        deviceLoop:{
            type:Object,
            default:()=>{}
        }
    }
}
</script>

<style scoped lang="scss">
.container {
    margin-bottom: 30px;

    .el-divider--vertical {
        height: 4em;
    }

}
</style>
